// 获取url query参数
export default function getQueryVariable(location,name)
{
  var url = location;
  var splitIndex = url.indexOf("?") + 1;
  var paramStr = url.substr(splitIndex, url.length);

  var arr = paramStr.split('&');
  for (var i = 0; i < arr.length; i++) {
      var kv = arr[i].split('=');
      if (kv[0] == name) {
          return kv[1];
      }
  }
  return "";

}